package com.sangmo.fts.training.repo;

import com.sangmo.boot.framework.plugin.dataview.spi.jpa.IJpaDataViewRepo;
import com.sangmo.fts.training.model.Team;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface TeamRepo extends IJpaDataViewRepo<Team> {

//    List<Team> findByCreatedBy(Long createdBy);

    List<Team> findByCreatedByAndExaminationId(Long createdBy, Long examinationId);

    List<Team> findByCreatedByAndBusinessTypeAndEndTimeGreaterThanAndExaminationIdIsNull(Long createdBy, String businessType, Date currentDate);
}
